using Gateway.Domain.EFCore.Configuration;
using Gateway.Domain.Entities;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Metadata.Builders;

namespace Gateway.Domain.Configuration;

/// <summary>
/// 工作流配置
/// </summary>
public class WorkFlowConfiguration : AggregateRootEntityConfiguration<WorkFlow>
{
    public override void Configure(EntityTypeBuilder<WorkFlow> builder)
    {
        builder.ToTable(t => t.HasComment("工作流表"));
        builder.Property(x => x.WorkFlowName).HasMaxLength(500).IsRequired().HasComment("工作流名称");
        builder.Property(x => x.WorkFlowCode).HasMaxLength(100).IsRequired().HasComment("工作流编码");
        base.Configure(builder);
    }
}